package org.hawk.gwt.ppc.scanner;
/**
 * This is general token interface for al the tokens.
 * 
 * @author alex.bereznevatiy@gmail.com
 */
public interface Token {
	/**
	 * @return string presentation of this token.
	 */
	String toString();
	/**
	 * @return string presentation of this token.
	 */
	String getToken();
	/**
	 * @return raw, unparsed string presentation of his token
	 */
	String getRawToken();
	/**
	 * Modifies this token with value passed.
	 * @param raw
	 */
	void setToken(String raw);
	/**
	 * @return index of this token in the token sequence.
	 */
	int getIndex();
	/**
	 * @return <code>true</code> if this token is already modified
	 * with {@link Token#setToken(String)} call.
	 */
	boolean isModified();
	/**
	 * @return debug information (usually line and column
	 * where this token begins). If debug information is not available
	 * - returns empty string.
	 */
	String getDebugInfo();
	/**
	 * @return next token in the list of null
	 */
	Token getNext();
	/**
	 * @return previous token in the list or null
	 */
	Token getPrevious();
}
